package org.gp.core.service;

import com.baomidou.mybatisplus.service.IService;
import org.gp.core.entity.Activity;
import org.gp.core.entity.dto.ResponseDTO;
import org.gp.core.entity.result.ActivityDetailResult;
import org.gp.core.entity.result.ActivityResult;
import org.gp.core.entity.result.AdminInfoResult;
import org.gp.core.entity.result.SponsorActResult;
import org.gp.core.web.param.SeekActParam;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author LuoLiang
 * @since 2017-01-24
 */
public interface IActivityService extends IService<Activity> {
    /**
     * 发起一个活动，即插入一条活动数据
     *
     * @param activity
     */
    ResponseDTO<SponsorActResult> sponsorActivity(Activity activity);

    /**
     * 查询返回活动列表
     *
     * @param param
     * @return
     */
    ResponseDTO<List<ActivityResult>> getActListByHobby(SeekActParam param, Integer userId);

    /**
     * 查询并生成单个活动详情信息
     *
     * @param activityId
     * @return
     */
    ResponseDTO<ActivityDetailResult> getActivityDetailInfo(Integer activityId);

    /**
     * 查询用户已参加的活动列表
     *
     * @param userId
     * @return
     */
    ResponseDTO<List<ActivityDetailResult>> getActListByUser(Integer userId, String flag);

    /**
     * 用户加入某活动
     *
     * @param userId
     * @param activityId
     * @return
     */
    ResponseDTO joinActivity(Integer userId, Integer activityId, String introduce, String phone);

    /**
     * 通过活动
     *
     * @param activityId
     * @param sponsorId
     * @return
     */
    ResponseDTO passActivity(Integer activityId, Integer sponsorId);

    /**
     * 拒绝or中止活动
     *
     * @param activityId
     * @param sponsorId
     * @param reason
     * @return
     */
    ResponseDTO refuseActivity(Integer activityId, Integer sponsorId, String reason);

    /**
     * 生成管理员信息
     *
     * @return
     */
    ResponseDTO<AdminInfoResult> initAdminInfo();

    /**
     * 获得相关活动信息
     */
    ResponseDTO<List<ActivityDetailResult>> relatedActivity(Integer activityId, Integer sponsorIde);

    /**
     * 获取单个活动信息
     */
    ResponseDTO<Activity> getActivity(Integer id);
}
